$ai-chat: (
  // 标准态
  'color': #3b3b3b,
  'icon-color': #3b3b3b,
  'border-color': #e5e5e5,
  'background-color': #fff,
  'background-color-light': #f8fafb,
  // 禁用态
  'disabled-color': rgb(59 59 59 / 60%),
  // 悬浮态
  'hover-color': #3b3b3b,
  'hover-background-color': #e9e9e9,
  'hover-border-color': #e5e5e5,
  // 默认圆角
  'border-radius': 5px,
  // 样式2
  'color-2': #4d6bfe,
  'background-color-2': rgb(219 234 254),
  'hover-background-color-2': #c3daf8,
  'scroll-bar-width': 8px,
  'scroll-bar-height': 8px,
  'scroll-bar-radius': 4px,
);

@include b(chat-container) {
  @include set-component-css-var('ai-chat', $ai-chat);

  @include e(dialog) {
    position: absolute;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    background-color: #{getCssVar('ai-chat', 'background-color')};
    border: 1px solid #{getCssVar('ai-chat', 'border-color')};
    border-radius: #{getCssVar('ai-chat', 'border-radius')};
  
    * {
      box-sizing: border-box;
    }
  
    svg {
      display: inline-block;
      width: 1em;
      height: 1em;
      font-size: 1.5em; /* 设置字体大小 */
      vertical-align: middle;
      fill: currentcolor;
    }
    @include when(hidden) {
      display: none;
    }
  }

  @include e(toolbar) {
    position: absolute;
    bottom: 118px;
    left: 50%;
    gap: 8px 4px;
    justify-content: center;
    width: max-content;
    min-height: 48px;
    margin: 0;
    transform: translateX(-50%);
    @include when(has-materials) {
      bottom: 180px;
    }
  }

  *::-webkit-scrollbar {
    width: getCssVar('ai-chat', 'scroll-bar-width');
    height: getCssVar('ai-chat', 'scroll-bar-height');
  }

  *::-webkit-scrollbar-thumb {
    border-radius: getCssVar('ai-chat', 'scroll-bar-radius');
  }
}

@include b(chat-container-header) {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 4px;
  cursor: move;
  border-bottom: 1px solid #{getCssVar('ai-chat', 'border-color')};
}

@include b(chat-container-header-caption) {
  padding: 0 6px 0 16px;
  font-size: 18px;
  font-weight: 800;
}

@include b(chat-container-header-action-wrapper) {
  display: flex;
  gap: 6px;
  align-items: center;
  height: 100%;
  padding: 0 6px;

  @include e(action-item) {
    flex-shrink: 0;
    padding: 3px;
    font-size: 12px;
    color: #{getCssVar('ai-chat', 'color')};
    border-radius: #{getCssVar('ai-chat', 'border-radius')};

    &:hover {
      color: #{getCssVar('ai-chat', 'hover-color')};
      cursor: pointer;
      background-color: #{getCssVar('ai-chat', 'hover-background-color')};
    }
  }
}

@include b(chat-container-main) {
  display: flex;
  height: calc(100% - 60px);
}

@include b(chat-container-main__left) {
  flex-shrink: 0;
  width: 200px;
  height: 100%;
  border-right: 1px solid #{getCssVar('ai-chat', 'border-color')};
}

@include b(chat-container-main__right) {
  position: relative;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  width: calc(100% - 200px);
  height: 100%;

  .#{bem(chat-messages)} {
    padding-bottom: 48px;
  }
}

@include b(chat-container-main__default) {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  height: calc(100% - 60px);
}

@include b(chat-container-content) {
  position: relative;
  flex-grow: 1;
  overflow: hidden;
}

@include b(chat-container-footer) {
  flex-shrink: 0;
  padding: 3px 6px;
  border-top: 1px solid #{getCssVar('ai-chat', 'border-color')};
}
